<%@ page pageEncoding="UTF-8"%>

<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/struts-nested" prefix="nested"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix='fmt'%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<script>
	
	$(function() {
		event_bind_del();
	});
</script>
 
<table class="datalst" width="100%" cellpadding="0" cellspacing="0" bordercolor="#CDE0F5" border="1">

	<thead>
		<th>学号</th>
		<th>姓名(中文)</th>
		<th>姓名(英文)</th>
		<th>性别</th>
		<th>学生状态</th>
		<th>年级</th>
		<th>就读学校</th>
		<th>编辑</th>
		<th>删除</th>
	</thead>
	<tbody id="datable">
		<logic:notEmpty name="student.page">
			<logic:iterate id="entry" name="student.page" property="items" indexId="idx">
				<bean:define id="enroll_flag" value="1" />
				<tr id="datarow<bean:write name='entry' property='id'/>" <c:if test="${idx % 2 == 1}">bgcolor="#fafafa"</c:if>>
					<td>${entry.studentNo ne "" ? entry.studentNo : '/'}</td>
					<td>${entry.studentCName ne "" ? entry.studentCName : '/'}</td>
					<td>${entry.studentEName ne "" ? entry.studentEName : '/'}</td>
					<td>${entry.studentSex == 1 ? '男' : '女'}</td>
					<td>${entry.studentStatusText}</td>
					<td>${entry.studentAge}</td>
					<td>${entry.studentSeniorSchool!=''? entry.studentSeniorSchool :( entry.studentMiddleSchool != '' ? entry.studentMiddleSchool :entry.studentPrimarySchool)}</td>
					<td><span class="detail">[<a href="admin/student.do?action=studentPageEdit&id=<bean:write name='entry' property='id'/>">编辑</a>]</span></td>
					<td><span class="detail">[<a href="javascript:void(0);" id="del_${entry.id}">删除</a>]</span></td>
				</tr>
			</logic:iterate>
			<c:if test="${enroll_flag == null || enroll_flag != 1}">
				<tr><td colspan="8">没有符合您所带班级的学生信息。。。</td></tr>
			</c:if>
		</logic:notEmpty>
		<logic:empty name="student.page">
			<tr><td colspan="8">没有符合条件的学生信息。。。</td></tr>
		</logic:empty>
	</tbody>
	<tfoot>
		<c:if test="${k!=1}">
		<th colspan="12">
			<logic:notEmpty name="student.page" scope="request">
				<bean:define id='total' name="student.page" property="totalPage" />
				<bean:define id='currentPage' name="student.page" property="currentPage" />
				<div class="pagination">
					<div class="pageopr">
						<a href="javascript:move2first();" title="首页"><img align="absmiddle" src="resources/images/layout/page_home.jpg"></a>
						<a href="javascript:move2previous();" title="上一页"><img align="absmiddle" src="resources/images/layout/page_pre.jpg"></a>
						<a href="javascript:move2next();" title="下一页"><img align="absmiddle" src="resources/images/layout/page_next.jpg"></a>
						<a href="javascript:move2tail();" title="尾页"><img align="absmiddle" src="resources/images/layout/page_last.jpg"></a>
						<a class="top" href="admin/maintenance/student#top"><img align="absmiddle" src="resources/images/layout/page_top.jpg"></a>
					</div>
					<div class="lstinfo">
						<span>数据：<label id='totalCount'><bean:write name="student.page" property="totalCount" /></label>条</span>
						<span>第<input type="text" class="pageinput text" id="rdpage" value="<bean:write name='student.page' property='currentPage' />">/<label id='totalPage'><bean:write name="student.page" property="totalPage" /></label>页</span>
						<span><a href="javascript:move2page();"><img align="absmiddle" src="resources/images/layout/page_redirect.jpg"></a></span>
					</div>
				</div>
			</logic:notEmpty>
			<b class="clear"></b>
		</th>
		</c:if>
	</tfoot>
</table>

<input type="hidden" name="param" value="page=<logic:notEmpty name='student.page'><bean:write name='student.page' property='currentPage' /></logic:notEmpty>" />